package com.wx.tgp.designpattern.StrategyPattern.CalculatorPrice;

/**
 * 价格类
 */
public class Price {

    private MemberStrategy memberStrategy;

    public Price (MemberStrategy memberStrategy){
        this.memberStrategy = memberStrategy;
    }

    /**
     * 计算图书的价格
     * @param bookPrice
     * @return
     */
    public double qoute(double bookPrice){
        return memberStrategy.calcPrice(bookPrice);
    }
}
